//
//  DDMeHeaderView.m
//  DingDongZP
//
//  Created by Jyh on 16/3/19.
//  Copyright © 2016年 iyhjiang.com. All rights reserved.
//

#import "DDMeHeaderView.h"

@implementation DDMeHeaderView
{
    //  用于算高度
    IBOutlet UIView *_bottomView;
}

- (void)awakeFromNib
{
    self.avatarImageView.layer.cornerRadius = 38;
    self.avatarImageView.layer.masksToBounds = YES;
    
    WEAKSELF ///// 活跃度部分
    [self.activenessView bk_whenTapped:^{
        
        if (weakSelf.activenessBlock) {
            weakSelf.activenessBlock();
        }
    }];
    //// 关注度部分
    [self.attentionView bk_whenTapped:^{
        if (weakSelf.attentionBlock) {
            weakSelf.attentionBlock();
        }
    }];
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    self.height = CGRectGetMaxY(_bottomView.frame);
}


+ (instancetype)meHeaderView
{
    return [[[NSBundle mainBundle] loadNibNamed:@"DDMeHeaderView" owner:nil options:nil] firstObject];
}

- (IBAction)editMeClicked
{
    if (self.editInfoBlock) {
        self.editInfoBlock();
    }
}
- (IBAction)meResumeClicked:(id)sender {
    if (self.tapMyResume) {
        self.tapMyResume();
    }
}

- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
    NSLog(@"begin");
}

@end
